"""
@author: gaoyx
@date: 2021-12-27 14:05:56
"""
<!-- 电话记录 -->
<template>
  <div>
    <van-search v-model="keywords" shape="round" show-action placeholder="请输入搜索关键词" @search="onSearch" @cancel="onCancel" @clear='onClear' />
    <van-empty v-if="isShow" description="暂无信息" />
  </div>
</template>

<script>
export default {
  name: 'search',
  props: {
    isShow: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      keywords: ''
    }
  },
  methods: {
    onSearch () {
      this.$emit('search', this.keywords)
    },
    onClear () {
      this.$emit('update:isShow', true)
    },
    onCancel () {
      
      this.$router.back()
    }
  }
}
</script>

<style lang='scss' scoped>
::v-deep .card {
  padding: 17px;
  h3 {
    font-weight: 400;
    margin-bottom: 10px;
  }
}

::v-deep.van-divider {
  margin: 10px 0px;
  border-color: #f2f2f2;
}
</style>